package com.totem.base.enums;

import lombok.Getter;

import java.util.Objects;

@Getter
public enum CryptoCurrencyEnum {
    TRC("USDT-TRC20"), // 波场
    ETH("USDT-ERC20"), // 以太
    BNB("USDT-BEP20"); // 币安
    private final String code;

    CryptoCurrencyEnum(String code){
        this.code = code;
    }

    public static CryptoCurrencyEnum byCode(String code) {
        for (CryptoCurrencyEnum e: CryptoCurrencyEnum.values()) {
            if (e.code.equalsIgnoreCase(code)) {
                return e;
            }
        }
        return null;
    }
}
